using UnityEngine;

public class FriendDetailedProgressCard : MonoBehaviour
{
	public new UILabel name;

	public UITexture texture;

	private FriendProfileButton friendProfileButton;

	public void Init(FriendProfileButton friendProfileButton)
	{
		if (this.friendProfileButton != null)
		{
			this.friendProfileButton.SetTextureUpdateListener(null);
		}
		this.friendProfileButton = friendProfileButton;
		friendProfileButton.SetTextureUpdateListener(SetTexture);
		UITools.ChangeText(name, friendProfileButton.friendProfile.playerName);
		SetTexture(friendProfileButton.myTexture);
		base.gameObject.SetActive(true);
	}

	public void SetTexture(Texture2D texture)
	{
		this.texture.mainTexture = texture;
	}
}
